<template>
	<view class="empty-state">
		<image 
			:src="image || defaultImage" 
			mode="aspectFit"
			class="empty-image"
		></image>
		<text class="empty-text">{{ text || '暂无数据' }}</text>
		<slot></slot>
	</view>
</template>

<script setup>
defineProps({
	image: String,
	text: String
})

const defaultImage = '/static/images/empty.png'
</script>

<style lang="scss" scoped>
.empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 60rpx 0;
	
	.empty-image {
		width: 200rpx;
		height: 200rpx;
		margin-bottom: 20rpx;
	}
	
	.empty-text {
		font-size: 28rpx;
		color: #999;
	}
}
</style> 